<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Console extends CI_controller {

	public function __construct(){
		parent::__construct();
	}

	public function index(){
        // die();
		$data = array();
		if($this->session->userdata('user') !== false) {
			$data['user'] = json_encode($this->session->userdata('user'));
		}
		$this->load->view('zm/console',$data);
	}

    private function _ShowType4Html($arr){
        $result = array();
        foreach ($arr as $k => $v) {
            $result[] = $k.'=>'.$v;
        }
        return $result;
    }

	public function getApis() {
        // die();
		$apis = array(
			array(
                'url' => 'api_youku_answer/submitAnswer',
                'title' => '优酷问答-提交答案',
                'group_name' => '优酷问答',
                'params' => array(
					array('name' => 'answer0','value' => 'a'),
					array('name' => 'answer1','value' => 'b'),
					array('name' => 'answer2','value' => 'c'),
					array('name' => 'answer3','value' => 'd'),
					array('name' => 'answer4','value' => 'a'),
					array('name' => 'answer5','value' => 'b'),
					array('name' => 'answer6','value' => 'c'),
					array('name' => 'answer7','value' => 'd'),
					array('name' => 'answer8','value' => 'a'),
					array('name' => 'answer9','value' => 'b'),
					array('name' => 'answer_result','value' => '认真就输了'),
                ),
                'remark' => '',
            ),
		);

		$this->response->setSuccess();
		$this->response->setItems($apis);
		$this->response->responseExit();
	}
}
/* End of file console.php */
/* Location: ./application/controllers/console.php */
